﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;

namespace RepositoryAndEf.Infrastructure.Encryption
{
    public class MD5EncryptService : IEncryptionService
    {
        public string Encrypt(string content)
        {
            byte[] result = Encoding.Default.GetBytes(content);
            var md5 = new MD5CryptoServiceProvider();

            byte[] output = md5.ComputeHash(result);
            return BitConverter.ToString(output).Replace("-", "");
        }
    }
}
